package com.youyi.yyviewsdklibrary.View.searchview.utils;

import android.content.Context;
import android.util.TypedValue;

public class DimensUtils {
    private DimensUtils() {
    }

    public static int convertDpToPx(int i, Context context) {
        return Math.round(TypedValue.applyDimension(1, (float) i, context.getResources().getDisplayMetrics()));
    }

    public static float convertDpToPx(float f, Context context) {
        return TypedValue.applyDimension(1, f, context.getResources().getDisplayMetrics());
    }
}
